Integrand size = 32, antiderivative size = 128 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=-\frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b g}+\frac {2 B \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b g}+\frac {2 B^2 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{b g} \]
-(A+B*ln(e*(b*x+a)/(d*x+c)))^2*ln(1-b*(d*x+c)/d/(b*x+a))/b/g+2*B*(A+B*ln(e *(b*x+a)/(d*x+c)))*polylog(2,b*(d*x+c)/d/(b*x+a))/b/g+2*B^2*polylog(3,b*(d *x+c)/d/(b*x+a))/b/g
Leaf count is larger than twice the leaf count of optimal. \(458\) vs. \(2(128)=256\).
Time = 0.94 (sec) , antiderivative size = 458, normalized size of antiderivative = 3.58 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\frac {3 A^2 \log (a+b x)+3 A B \left (\log ^2\left (\frac {a}{b}+x\right )-2 \log (a+b x) \left (\log \left (\frac {a}{b}+x\right )-\log \left (\frac {c}{d}+x\right )-\log \left (\frac {e (a+b x)}{c+d x}\right )\right )-2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )+B^2 \left (\log ^3\left (\frac {a}{b}+x\right )+3 \log ^2\left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+3 \log (a+b x) \left (-\log \left (\frac {a}{b}+x\right )+\log \left (\frac {c}{d}+x\right )+\log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2+3 \log ^2\left (\frac {a}{b}+x\right ) \left (-\log \left (\frac {c}{d}+x\right )+\log \left (\frac {b (c+d x)}{b c-a d}\right )\right )+6 \log \left (\frac {a}{b}+x\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )+6 \log \left (\frac {c}{d}+x\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )-3 \left (\log \left (\frac {a}{b}+x\right )-\log \left (\frac {c}{d}+x\right )-\log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \left (\log ^2\left (\frac {a}{b}+x\right )-2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )-6 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{-b c+a d}\right )-6 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{b c-a d}\right )\right )}{3 b g} \]
(3*A^2*Log[a + b*x] + 3*A*B*(Log[a/b + x]^2 - 2*Log[a + b*x]*(Log[a/b + x] - Log[c/d + x] - Log[(e*(a + b*x))/(c + d*x)]) - 2*(Log[c/d + x]*Log[(d*( a + b*x))/(-(b*c) + a*d)] + PolyLog[2, (b*(c + d*x))/(b*c - a*d)])) + B^2* (Log[a/b + x]^3 + 3*Log[c/d + x]^2*Log[(d*(a + b*x))/(-(b*c) + a*d)] + 3*L og[a + b*x]*(-Log[a/b + x] + Log[c/d + x] + Log[(e*(a + b*x))/(c + d*x)])^ 2 + 3*Log[a/b + x]^2*(-Log[c/d + x] + Log[(b*(c + d*x))/(b*c - a*d)]) + 6* Log[a/b + x]*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)] + 6*Log[c/d + x]*Pol yLog[2, (b*(c + d*x))/(b*c - a*d)] - 3*(Log[a/b + x] - Log[c/d + x] - Log[ (e*(a + b*x))/(c + d*x)])*(Log[a/b + x]^2 - 2*(Log[c/d + x]*Log[(d*(a + b* x))/(-(b*c) + a*d)] + PolyLog[2, (b*(c + d*x))/(b*c - a*d)])) - 6*PolyLog[ 3, (d*(a + b*x))/(-(b*c) + a*d)] - 6*PolyLog[3, (b*(c + d*x))/(b*c - a*d)] ))/(3*b*g)
Time = 0.44 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.93, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2950, 2779, 2821, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{a g+b g x} \, dx\) |
\(\Big \downarrow \) 2950 |
\(\displaystyle \frac {\int \frac {(c+d x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{(a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{g}\) |
\(\Big \downarrow \) 2779 |
\(\displaystyle \frac {\frac {2 B \int \frac {(c+d x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {\frac {2 B \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )-B \int \frac {(c+d x) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {\frac {2 B \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )+B \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{b}}{g}\) |
(-(((A + B*Log[(e*(a + b*x))/(c + d*x)])^2*Log[1 - (b*(c + d*x))/(d*(a + b *x))])/b) + (2*B*((A + B*Log[(e*(a + b*x))/(c + d*x)])*PolyLog[2, (b*(c + d*x))/(d*(a + b*x))] + B*PolyLog[3, (b*(c + d*x))/(d*(a + b*x))]))/b)/g
3.2.1.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b _.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c *x^n])^p/m), x] + Simp[b*n*(p/m) Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c *x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^( m + 1)*(g/b)^m Subst[Int[x^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + 2)), x] , x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] & & EqQ[n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && IntegersQ[m, p] && E qQ[b*f - a*g, 0] && (GtQ[p, 0] || LtQ[m, -1])
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Leaf count of result is larger than twice the leaf count of optimal. \(463\) vs. \(2(128)=256\).
Time = 1.18 (sec) , antiderivative size = 464, normalized size of antiderivative = 3.62
method | result | size |
parts | \(\frac {A^{2} \ln \left (b x +a \right )}{g b}-\frac {B^{2} e \left (-\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{3}}{3 b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (1-\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )+2 \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \operatorname {Li}_{2}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )-2 \,\operatorname {Li}_{3}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{b e}\right )}{g}-\frac {2 A B \left (a d -c b \right ) e \left (-\frac {d^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 \left (a d -c b \right ) b e}+\frac {d^{3} \left (\frac {\operatorname {dilog}\left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \ln \left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}\right )}{\left (a d -c b \right ) b e}\right )}{g \,d^{2}}\) | \(464\) |
derivativedivides | \(-\frac {e \left (a d -c b \right ) \left (-\frac {d^{2} A^{2} \left (-\frac {\ln \left (b e -\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d \right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{g \left (a d -c b \right )}-\frac {d^{2} B^{2} \left (-\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (1-\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )+2 \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \operatorname {Li}_{2}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )-2 \,\operatorname {Li}_{3}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{3}}{3 b e}\right )}{g \left (a d -c b \right )}-\frac {2 d^{2} A B \left (-\frac {d \left (\frac {\operatorname {dilog}\left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \ln \left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}\right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 b e}\right )}{g \left (a d -c b \right )}\right )}{d^{2}}\) | \(552\) |
default | \(-\frac {e \left (a d -c b \right ) \left (-\frac {d^{2} A^{2} \left (-\frac {\ln \left (b e -\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d \right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{g \left (a d -c b \right )}-\frac {d^{2} B^{2} \left (-\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (1-\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )+2 \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \operatorname {Li}_{2}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )-2 \,\operatorname {Li}_{3}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{3}}{3 b e}\right )}{g \left (a d -c b \right )}-\frac {2 d^{2} A B \left (-\frac {d \left (\frac {\operatorname {dilog}\left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \ln \left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right )}{d}\right )}{b e}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 b e}\right )}{g \left (a d -c b \right )}\right )}{d^{2}}\) | \(552\) |
risch | \(\frac {A^{2} \ln \left (b x +a \right )}{g b}+\frac {B^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{3}}{3 g b}-\frac {B^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (1-\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{g b}-\frac {2 B^{2} \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \operatorname {Li}_{2}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{g b}+\frac {2 B^{2} \operatorname {Li}_{3}\left (\frac {d \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )}{b e}\right )}{g b}+\frac {A B d \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} a}{g \left (a d -c b \right ) b}-\frac {A B \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right )^{2} c}{g \left (a d -c b \right )}-\frac {2 A B d \operatorname {dilog}\left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right ) a}{g \left (a d -c b \right ) b}+\frac {2 A B \operatorname {dilog}\left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right ) c}{g \left (a d -c b \right )}-\frac {2 A B d \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \ln \left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right ) a}{g \left (a d -c b \right ) b}+\frac {2 A B \ln \left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) \ln \left (-\frac {\left (\frac {b e}{d}+\frac {\left (a d -c b \right ) e}{d \left (d x +c \right )}\right ) d -b e}{b e}\right ) c}{g \left (a d -c b \right )}\) | \(670\) |
A^2/g*ln(b*x+a)/b-B^2/g*e*(-1/3/b/e*ln(b*e/d+(a*d-b*c)*e/d/(d*x+c))^3+1/b/ e*(ln(b*e/d+(a*d-b*c)*e/d/(d*x+c))^2*ln(1-1/b/e*d*(b*e/d+(a*d-b*c)*e/d/(d* x+c)))+2*ln(b*e/d+(a*d-b*c)*e/d/(d*x+c))*polylog(2,1/b/e*d*(b*e/d+(a*d-b*c )*e/d/(d*x+c)))-2*polylog(3,1/b/e*d*(b*e/d+(a*d-b*c)*e/d/(d*x+c)))))-2*A*B /g/d^2*(a*d-b*c)*e*(-1/2/(a*d-b*c)*d^2/b/e*ln(b*e/d+(a*d-b*c)*e/d/(d*x+c)) ^2+1/(a*d-b*c)*d^3/b/e*(dilog(-((b*e/d+(a*d-b*c)*e/d/(d*x+c))*d-b*e)/b/e)/ d+ln(b*e/d+(a*d-b*c)*e/d/(d*x+c))*ln(-((b*e/d+(a*d-b*c)*e/d/(d*x+c))*d-b*e )/b/e)/d))
\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \]
integral((B^2*log((b*e*x + a*e)/(d*x + c))^2 + 2*A*B*log((b*e*x + a*e)/(d* x + c)) + A^2)/(b*g*x + a*g), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\frac {\int \frac {A^{2}}{a + b x}\, dx + \int \frac {B^{2} \log {\left (\frac {a e}{c + d x} + \frac {b e x}{c + d x} \right )}^{2}}{a + b x}\, dx + \int \frac {2 A B \log {\left (\frac {a e}{c + d x} + \frac {b e x}{c + d x} \right )}}{a + b x}\, dx}{g} \]
(Integral(A**2/(a + b*x), x) + Integral(B**2*log(a*e/(c + d*x) + b*e*x/(c + d*x))**2/(a + b*x), x) + Integral(2*A*B*log(a*e/(c + d*x) + b*e*x/(c + d *x))/(a + b*x), x))/g
\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \]
B^2*log(b*x + a)*log(d*x + c)^2/(b*g) + A^2*log(b*g*x + a*g)/(b*g) - integ rate(-(B^2*b*c*log(e)^2 + 2*A*B*b*c*log(e) + (B^2*b*d*x + B^2*b*c)*log(b*x + a)^2 + (B^2*b*d*log(e)^2 + 2*A*B*b*d*log(e))*x + 2*(B^2*b*c*log(e) + A* B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x)*log(b*x + a) - 2*(B^2*b*c*log(e) + A *B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x + (2*B^2*b*d*x + (b*c + a*d)*B^2)*lo g(b*x + a))*log(d*x + c))/(b^2*d*g*x^2 + a*b*c*g + (b^2*c*g + a*b*d*g)*x), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \]
Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{a g+b g x} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\right )}^2}{a\,g+b\,g\,x} \,d x \]